import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [{
		path: '/',
		name: 'Home',
		redirect: '/index',
		component: () => import( /* webpackChunkName: "Home" */ '../views/Home.vue'),
		children: [{
				path: 'index',
				name: 'index',
				component: () => import( /* webpackChunkName: "mainPage" */ '../views/mainPage/index.vue')
			},
			{
				path: 'production',
				name: 'production',
				component: () => import( /* webpackChunkName: "productionPage" */ '../views/production/index.vue')
			}
		]
	},
	{
		//将高德地图注册成页面形式使用iframe消除父容器scale带来的影响
		path: '/gdmap',
		name: 'gdmap',
		component: () => import( /* webpackChunkName: "gdmap" */ '../views/production/gdmap.vue')
	},
	{
		path: '*',
		redirect: '/'
	}
]

const router = new VueRouter({
	routes
})

export default router
